package top.lishuoboy.ssm.config.properties;

import cn.hutool.core.util.CharsetUtil;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Data
@Component
@PropertySource(value = "classpath:application.properties", encoding = CharsetUtil.UTF_8)
public class DataSourceProps {
    @Value("${datasource.driver}")
    private String driver;
    @Value("${datasource.url}")
    private String url;
    @Value("${datasource.user}")
    private String user;
    @Value("${datasource.pass}")
    private String pass;
    @Value("${datasource.initialSize:5}")
    private int initialSize;
    @Value("${datasource.minIdle:5}")
    private int minIdle;
    @Value("${datasource.maxActive:10}")
    private int maxActive;
    @Value("${datasource.maxWait:30000}")
    private long maxWait;
}